module.exports = {
  devServer: {
    host: "localhost", //target host
    port: 8080,
    proxy: {
      "/api": {
        target: "http://localhost:3000", //代理地址，这里设置的地址会代替axios中设置的baseURL
        changeOrigin: true, // 如果接口跨域，需要进行这个参数配置
        ws: true, // proxy websockets
        pathRewrite: {
          "^/api": "",
        },
      },
      "/word": {
        target: 'http://music.163.com/api',
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          '^/word': ''
        }
      },
    },
  },
  //...
};
